let isInt = function(value){
    return value== value>> 0;
};

/**
 * @return {number}
 */
function* DesignToIosYield(value) {
    yield value / 3;
    return value / 3;
}

/**
 * @return {string}
 */
function* DesignToPx(value) {
    var resvalue = value;
    if (!isInt(resvalue)) {
        resvalue = resvalue.toFixed(7);
    }
    return resvalue + "px";
}

function* resolveAllFunc(data) {
    data.value = yield* DesignToIosYield(data.value);
    data.value = yield* DesignToPx(data.value);
}

function* BasicResolveFunc(data) {
    data.value = yield* DesignToPx(data.value);
}

module.exports = {
    resolveAllFunc,
    BasicResolveFunc
};